<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <link rel="StyleSheet" href="../css/jpetstore.css" type="text/css" media="screen"/>
</head>
<body>
<div th:replace="common/top">

</div>

<div id="Content">
    <div id="Catalog">

        <div id="BackLink">
            <a th:href="@{viewProduct?productId=}+${product.productId}">
                Return to <label th:text="${product.productId}">Category ID</label>
            </a>
        </div>

        <table>
            <tr>
                <img th:src="${product.descriptionImage}">
                <label th:text="${product.descriptionText}"></label>
            </tr>
            <tr>
                <td th:text="${item.itemId}"><b>itemId</b></td>
            </tr>
            <tr>
                <td th:text="${item.attribute1}"><b><font size="4">attributes</font></b></td>
            </tr>
            <tr>
                <td th:text="${product.name}">productName</td>
            </tr>
            <tr>
                <td>
                    <label th:if="${item.quantity<= 0}">Back ordered.</label>
                    <label th:if="${item.quantity> 0}" th:text="${item.quantity}+'in stock'">Quantity in stock.</label>
                </td>
            </tr>
            <tr>
                <td th:text="'$'+${#numbers.formatDecimal(item.listPrice,1,2)}">Item List Price</td>
            </tr>

            <tr>
                <td>
                    <a class="Button"  th:href="'/catalog/addItemToCart?workingItemId='+${item.itemId}">Add to Cart</a>
                </td>
            </tr>
        </table>

    </div>
</div>

<div th:replace="common/botton">

</div>

</body>
</html>